import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;

import org.apache.commons.io.IOUtils;

import com.swf.seed.regex.PatternUtils;


public class Test1 {
	public static void main(String[] args) throws FileNotFoundException, IOException {
		File file = new File("C:/Users/shenwf10476/Desktop/fund_batch_1900000107_20150306_001/fund_batch_consume_1900000107_20150306_001.txt");
		List<String> lines = IOUtils.readLines(new FileInputStream(file));
		StringBuilder stringBuilder = new StringBuilder();
		long count = 100000000;
		for (int i=0;i<lines.size();i++){
			stringBuilder.append(lines.get(i).replaceAll("OP\\d+", "OP"+(count+i))).append("\n");
		}
		IOUtils.write(stringBuilder.toString(), new FileOutputStream("C:/Users/shenwf10476/Desktop/fund_batch_1900000107_20150306_001/"+file.getName()+".bak"));
	}
	
}
